package com.chen.controller;

import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController

public class TestController {
    @GetMapping("/t1")
    public String t1(){

        return "ok";
    }
    @RequestMapping("/test")
    public String test(Model model){
        model.addAttribute("user","hello");
        return "main";
    }
}
